<template>
  <view class="cart-page">
    <NavBar title="购物车" :left-arrow="false" />
    <view class="cart-content">
      <CartBotActions @goPay="showToast" @checkAll="checkAll" />
    </view>
    <TabBar active="cart" />
  </view>
</template>

<script setup>
import TabBar from "@/components/TabBar.vue";
import NavBar from "@/components/NavBar.vue";
import CartBotActions from "./components/CartBotActions.vue";
import { useToast, useMessage } from "wot-design-uni";
const toast = useToast();
const message = useMessage();
const showToast = () => {
  toast.success({
    msg: "加入成功",
  });
};
const checkAll = (val) => {
  console.log(val);
  message
    .confirm({
      title: "提示",
      msg: "您确定要全选吗？",
    })
    .then(() => {
      toast.success({
        msg: "删除成功",
      });
    })
    .catch(() => {
      toast.success({
        msg: "取消成功",
      });
    });
};
</script>

<style scoped></style>
